package com.xiumu.common.core.exception.dict;

import com.xiumu.common.core.exception.base.IBaseException;

/**
 * 字典异常
 * 1400-1499
 *
 * @author XiuMu
 * @since 2025/1/1 12:24
 */
public enum DictException implements IBaseException {

    META_NOT_JSON(1403, "补充字段必须是json格式"),
    DICT_ITEM_EXIST(1402, "该字典项已存在"),
    DICT_EXIST(1401, "字典编码已存在"),
    NOT_EXIST(1400, "字典不存在");

    private final Integer code;

    private final String message;

    DictException(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
